package com.wench.design.pattern.factory.abstract_factory;

/**
 * @author wench
 */
public class AbstractFactoryClient {

    public static void main(String[] args) {

        AmericanDessertFactory americanDessertFactory = new AmericanDessertFactory();
        Dessert dessert = americanDessertFactory.createDessert();
        Coffee americanCoffee = americanDessertFactory.createCoffee();
        dessert.show();
        System.out.println(americanCoffee.getName());

        System.out.println("=================================");

        ItalyDessertFactory italyDessertFactory = new ItalyDessertFactory();
        Coffee italyCoffee = italyDessertFactory.createCoffee();
        Dessert italyDessert = italyDessertFactory.createDessert();
        italyDessert.show();
        System.out.println(italyCoffee.getName());
    }
}
